<%@page import="tree_util.Account" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" import="java.util.*"
         pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html>
<head>
    <%
        String roleName = ((Account) session.getAttribute("account")).getRoleName();

    %>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="edge"/>
    <meta name="author" content="Daliu"/>
    <meta name="keywords" content="长江上游珍稀特有鱼类保护信息管理系统、长江上游、珍稀特有鱼类、保护信息"/>
    <meta name="describe" content="长江上游珍稀特有鱼类保护信息管理系统"/>
    <title>长江上游珍稀特有鱼类保护信息管理系统</title>

    <link href="css/jstree.min.css" rel="stylesheet"/>
    <link rel="stylesheet" href="font-awesome/css/font-awesome.min.css">
    <link href="css/left.css" rel="stylesheet"/>
    <script type="text/javascript" src="js/jquery-1.12.3.min.js"></script>

    <script>
        $(document).ready(function () {
            // 一级菜单
            $(".co").on("click", function () {
                if ($(this).siblings("ul").css("display") == "none") {
                    $(".co").siblings("ul").slideUp("500");
                    $(".fa").removeClass("fa-angle-down").addClass("fa-angle-left");
                    $(this).siblings("ul").slideDown("slow");
                    $(this).children("i").removeClass("fa-angle-left").addClass("fa-angle-down");
                }
                else {
                    $(this).siblings("ul").slideUp("500");
                    $(this).children("i").removeClass("fa-angle-down").addClass("fa-angle-left");
                }
            });
        });
    </script>
</head>
<body>
<div class="sidebar">
    <ul id="nav">
        <li class="navmenu">
            <% if (roleName.equals("admin") || roleName.equals("student")) {%>
            <div class="co">
                <span class="words">数据管理</span><i class="fa fa-angle-left fa-lg"></i>
            </div>
            <ul>
                <li><a href="tree.jsp" target="right_iframe"><span></span>数据录入</a></li>
                <li><a href=""><span></span>数据分析</a></li>
            </ul>
            <%} else if (roleName.equals("privilege")) {%>
            <div class="co">
                <a href="tree.jsp" target="right_iframe"><span class="words" style="color:white">数据检索</span></a>
            </div>
            <%} else if (roleName.equals("common")) {%>
            <div class="co">
                <a href="seeData.action" target="right_iframe"><span class="words" style="color:white">查看数据</span></a>
            </div>
            <%} else if (roleName.equals("mentor")) {%>
            <div class="co">
                <span class="words">数据管理</span><i class="fa fa-angle-left fa-lg"></i>
            </div>
            <ul>
                <li><a href=""><span></span>数据分析</a></li>
            </ul>
            <%}%>
        </li>

        <%-- <li class="navmenu">
        <% if(roleName.equals("admin")||roleName.equals("mentor")||roleName.equals("student")){%>
        <div class="co">
            <span class="words">数据检索</span><i class="fa fa-angle-left fa-lg"></i>
        </div>
        <%}%>
            <ul>
<!-- 						<li><a href="tree1.jsp" target="right_iframe"><span></span>监测点</a></li> -->
            </ul>
        </li> --%>

        <li class="navmenu">
            <% if (roleName.equals("admin") || roleName.equals("mentor") || roleName.equals("student")) {%>
            <div class="co">
                <span class="words">数据导入</span><i class="fa fa-angle-left fa-lg"></i>
            </div>
            <ul>
                <%
                    Account a = (Account) session.getAttribute("account");
                    String re = a.getRoleName();            //角色
                    if (re.equals("student")) {
                        out.println("<li><a href=\"poiexcel/import.jsp\"  target=\"right_iframe\"><span></span>导入导出</a></li>");
                    }%>
            </ul>
            <%}%>
        </li>
        <li class="navmenu">
            <div class="co">
                <span class="words">用户信息</span><i class="fa fa-angle-left fa-lg"></i>
            </div>
            <ul>
                <li><a href="userManager.jsp" target="right_iframe"><span></span>用户管理</a></li>
                <%
                    Account account = (Account) session.getAttribute("account");
                    String role = account.getRoleName();            //角色
// 						if(!role.equals("student")){
// 				       		out.println("<li><a href=\"user.jsp\"   target=\"right_iframe\"><span></span>用户激活</a></li>");
// 						}
                    if (role.equals("privilege")) {
                        out.println("<li><a href=\"user.jsp\"   target=\"right_iframe\"><span></span>用户审核</a></li>");
                    }
                    if (roleName.equals("mentor")) {
                        out.println("<li><a href=\"check.jsp\"   target=\"right_iframe\"><span></span>数据申请</a></li>");
                        out.println("<li><a href=\"seeData.action\"   target=\"right_iframe\"><span></span> 查看数据</a></li>");

                    }
                    if (roleName.equals("common")) {
                        out.println("<li><a href=\"check.jsp\"   target=\"right_iframe\"><span></span>数据申请</a></li>");

                    }
                    if (roleName.equals("group") || roleName.equals("mentor")) {
                        out.println("<li><a href=\"Examine.jsp\"   target=\"right_iframe\"><span></span>申请审查</a></li>");
                    }
                %>
            </ul>

        </li>
        <li class="navmenu">
            <div class="co">
                <span class="words">系统信息</span><i class="fa fa-angle-left fa-lg"></i>
            </div>
            <ul>

                <%
                    Account account2 = (Account) session.getAttribute("account");
                    String role2 = account.getRoleName();
                    if (!role2.equals("student")) {
                        out.println("<li><a href=\"\"><span></span>系统管理</a></li>");
                    }%>

            </ul>
        </li>
        <%if (roleName.equals("privilege")) {%>
        <!--子库管理 -->
        <li class="navmenu">
            <div class="co">
                <a href="sublibrary.jsp" target="right_iframe"><span class="words" style="color:white">子库管理</span></a>
            </div>
        </li>
        <%}%>
    </ul>
</div>
</body>
</html>
		
		